<?php
include("settings/database.php");
class batch extends database
{
        public function batch_year()
        {
                $sql        = "SELECT * FROM tbl_batch WHERE BATCH_ISACTIVE='true' ORDER BY BATCH_ID ASC";
                $result     = $this->query($sql);
                
                if(mysql_num_rows($result))
                {
                        while($row = mysql_fetch_array($result))
                        {
                                $data[] = array('BATCH' => $row['BATCH_YEAR']);
                        }
                        return $data;
                }
                else
                {
                        return "Error fetching batch year records!";
                }
        }
}
?>